home *** CD-ROM | disk | FTP | other *** search
- SQRT(3M) Last changed: 2-2-99
-
-
- NNAAMMEE
- ssqqrrtt, ffssqqrrtt, ssqqrrttff, ssqqrrttll, ccbbrrtt, ccbbrrttll - cube root, square root
-
- SSYYNNOOPPSSIISS
- ##iinncclluuddee <<mmaatthh..hh>>
-
- ddoouubbllee ssqqrrtt((ddoouubbllee _x));;
- ffllooaatt ffssqqrrtt((ffllooaatt _x));;
- ffllooaatt ssqqrrttff((ffllooaatt _x));;
- lloonngg ddoouubbllee ssqqrrttll((lloonngg ddoouubbllee _x));;
-
- ddoouubbllee ccbbrrtt((ddoouubbllee _x));;
- lloonngg ddoouubbllee ccbbrrttll((lloonngg ddoouubbllee _x));;
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- The single-precision and long double-precision routines listed above
- are only available in the standard math library, --llmm, and in --llmmxx.
-
- The ssqqrrtt functions return the nonnegative square root of their single
- argument _x. The function ssqqrrtt both accepts and returns values of type
- double. The functions ffssqqrrtt and ssqqrrttff accept and return float values.
- The function ssqqrrttll both accepts and returns values of type long
- double.
-
- A fast version of ssqqrrtt and ffssqqrrtt which are slightly less accurate are
- available in the library --llffaassttmm. On MIPS2 and newer processors, those
- routines are identical to the ones in lliibbmm..aa, because there are
- hardware square root instructions.
-
- The ccbbrrtt functions return the cube root of their single argument _x.
- The function ccbbrrtt both accepts and returns values of type double. The
- function ccbbrrttll both accepts and returns values of type long double.
-
- RREETTUURRNN VVAALLUUEESS
- Functions in the standard math library lliibbmm..aa, are referred to as --llmm
- versions. Those in math library lliibbmmxx..aa are referred to as --llmmxx
- versions. Those in the the BSD math library lliibbmm4433..aa are referred to
- as --llmm4433 versions. The --llmm and --llmmxx versions always return the default
- Quiet NaN and set eerrrrnnoo to EDOM when a NaN is used as an argument. A
- NaN argument usually causes the --llmm4433 versions to return the same
- argument. The --llmm4433 versions never set eerrrrnnoo.
-
- If _x is negative, the ssqqrrtt functions return a quiet NaN. The --llmm and
- --llmm4433 versions also set the flag in the floating-point coprocessor to
- indicate an invalid operation. The functions in the standard math
- library --llmm and in library --llmmxx also set eerrrrnnoo to EDOM.
-
- See mmaatthheerrrr(3M) for a description of error handling for --llmmxx
- functions.
-
- NNOOTTEESS
- Long double operations on this system are only supported in _r_o_u_n_d-_t_o-
- _n_e_a_r_e_s_t rounding mode (the default). The system must be in round-to-
- nearest rounding mode when calling any of the long double functions,
- or incorrect answers result.
-
- Users concerned with portability to other computer systems should note
- that the long double and float versions of these functions are
- optional according to the ANSI C Programming Language Specification
- ISO/IEC 9899 : 1990 (E).
-
- Long double functions have been renamed to be compliant with the
- ANSI-C standard, however to be backward compatible, they may still be
- called with the double precision function name prefixed with a qq.
-
- Code which calls ssqqrrtt(()) or ssqqrrttff(()) will be compiled into the machine
- instruction ssqqrrtt..dd or ssqqrrtt..ss if the code uses ##iinncclluuddeess <<mmaatthh..hh>>.
-
- EErrrroorrss
- ccbbrrtt is accurate to within 0.7 ULPs (a ULP if one _Unit in _Last _Place).
-
- lliibbmm..aa ssqqrrtt conforms to IEEE 754 and is correctly rounded in
- accordance with the rounding mode in force; the error is less than
- half a ULP in the default mode (round to nearest).
-
- The lliibbffaassttmm..aa ssqqrrtt and ffssqqrrtt error is a maximum of one ULP. (See
- however, the comments regarding --llffaassttmm above.)
-
- SSEEEE AALLSSOO
- mmaatthh(3M)
-
- This man page is available only online.
-